﻿CREATE TABLE [dbo].[Statistics_Sales_Count] (
    [Id]         INT          IDENTITY (1, 1) NOT NULL,
    [YF]         NVARCHAR (7) NULL,
    [CompanyId]  INT          NULL,
    [XSRS]       INT          NULL,
    [CreateDate] DATETIME     CONSTRAINT [DF_Statistics_Sales_Count_CreateDate] DEFAULT (getdate()) NULL,
    CONSTRAINT [PK_STATISTICS_SALES_COUNT] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE NONCLUSTERED INDEX [Index_SalesCount_YF_CId]
    ON [dbo].[Statistics_Sales_Count]([YF] ASC, [CompanyId] ASC);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = '每月销售人数', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Statistics_Sales_Count';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = '月份', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Statistics_Sales_Count', @level2type = N'COLUMN', @level2name = N'YF';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = '公司ID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Statistics_Sales_Count', @level2type = N'COLUMN', @level2name = N'CompanyId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = '销售人数', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Statistics_Sales_Count', @level2type = N'COLUMN', @level2name = N'XSRS';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = '生成时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Statistics_Sales_Count', @level2type = N'COLUMN', @level2name = N'CreateDate';

